program ks_manual_DiD, rclass

	version 12
	syntax, X(varname) D(varname) SEL(varname) XBASE(varname) DBASE(varname) SELBASE(varname)
	
	mata: mata_ksDiD_manual("`x'","`d'","`sel'","`xbase'","`dbase'","`selbase'")
	
	return scalar ks_abs=r(ks_abs)
	return scalar ks_0lt1=r(ks_0lt1)
	return scalar ks_1lt0=r(ks_1lt0)
	return scalar ks_DiD_abs=r(ks_DiD_abs)
	return scalar ks_DiD_0lt1=r(ks_DiD_0lt1)
	return scalar ks_DiD_1lt0=r(ks_DiD_1lt0)
	return scalar N=r(N)
	return scalar N1=r(N1)
	return scalar N0=r(N0)
	return scalar Nbase=r(Nbase)
	return scalar N1base=r(N1base)
	return scalar N0base=r(N0base)

end

	* 